package com.sun.chunqiugeneratorbasic.cli.example;

import picocli.CommandLine;

import java.util.concurrent.Callable;

public class Login implements Callable<Integer> {
    @CommandLine.Option(names={"-u","--user"},description="User name")
    String user;
    @CommandLine.Option(names={"-p","--password"},description="Passphrase",interactive=true)
    String password;


    @Override
    public Integer call() throws Exception {
        System.out.println("password="+password);
        return 1;
    }

    public static void main(String[] args) {
        new CommandLine(new Login()).execute("-u","user123","-p");
    }

}
